#
# Be sure to run `pod lib lint BKKit.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = 'BKKit'
  s.version          = '0.1.0'
  s.summary          = 'BKKit is a toolkit.'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
BKKit is a toolkit. It contains extention for the base classes and theme management and so on .
                       DESC

  s.homepage         = 'https://gitee.com/aonline/BKKit'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'zyh' => 'zhangyinghui@rongyiju.com' }
  s.source           = { :git => 'https://gitee.com/aonline/BKKit.git', :tag => s.version.to_s, :submodules => true}
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
  s.platform = :ios, '10.3.1'
  s.module_name = s.name
  PCH_BKKIT = <<-EOS
      #import "BKKit.h"
  EOS
#  s.prefix_header_contents = PCH_BKKIT
  
  s.ios.deployment_target = '10.0'

#  s.source_files = "BKKit/framework/module.modulemap"
#  s.public_header_files = 'BKKit/Classes/*.h'
  
  # s.resource_bundles = {
  #   'BKKit' => ['BKKit/Assets/*.png']
  # }

  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
#  s.default_subspec = 'core'
#s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(PODS_TARGET_SRCROOT)/BKKit/framework' }
#s.preserve_path = "BKKit/framework/module.modulemap"
#s.module_map = "BKKit/framework/module.modulemap"
  s.resource_bundles    = {
      "config" => ["BKKit/**/*.plist"]
  }
  
  s.subspec 'core' do |ss|
    ss.source_files = 'BKKit/Classes/*.{h,m}'
    ss.public_header_files = 'BKKit/Classes/*.h'
  end
  
  
  s.subspec 'ext' do |ss|
      ss.dependency 'BKKit/core'
#      ss.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/CommonCrypto" }
      ss.source_files = 'BKKit/Classes/ext/*.{h,m,c}'
      ss.public_header_files = 'BKKit/Classes/ext/*.h'
  end
  
  s.subspec 'utils' do |ss|
      ss.dependency 'Reachability'
      ss.dependency 'BKKit/ext'
      ss.source_files = 'BKKit/Classes/utils/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/utils/*.h'
  end
  s.subspec 'dao' do |ss|
      ss.dependency 'FMDB'
      ss.dependency 'BKKit/ext'
      ss.dependency 'BKKit/utils'
      ss.source_files = 'BKKit/Classes/dao/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/dao/*.h'
  end
  
  s.subspec 'http' do |ss|
      ss.dependency 'BKKit/ext'
      ss.dependency 'AFNetworking'
      ss.dependency 'BKKit/utils'
      ss.source_files = 'BKKit/Classes/http/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/http/*.h'
  end
  
  s.subspec 'api' do |ss|
      ss.dependency 'BKKit/ext'
      ss.dependency 'BKKit/dao'
      ss.dependency 'BKKit/http'
      ss.source_files = 'BKKit/Classes/api/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/api/*.h'
  end
  s.subspec 'ui' do |ss|
      ss.dependency 'BKKit/ext'
      ss.dependency 'BKKit/http'
      ss.source_files = 'BKKit/Classes/ui/**/*.{h,m}'
      ss.public_header_files = 'BKKit/Classes/ui/**/*.h'
      
      ss.subspec 'theme' do |sss|
          sss.dependency 'BKKit/dao'
          sss.source_files = 'BKKit/Classes/ui/theme/*.{h,m}'
          sss.public_header_files = 'BKKit/Classes/ui/theme/*.h'
      end
      ss.subspec 'view' do |sss|
          sss.dependency 'BKKit/ui/theme'
          sss.source_files = 'BKKit/Classes/ui/view/*.{h,m}'
          sss.public_header_files = 'BKKit/Classes/ui/view/*.h'
      end
      
      ss.subspec 'controller' do |sss|
          sss.dependency 'BKKit/ui/view'
          sss.source_files = 'BKKit/Classes/ui/controller/*.{h,m}'
          sss.public_header_files = 'BKKit/Classes/ui/controller/*.h'
      end
  end
  
end
